﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DALHelper.DAL;

namespace DALHelper.Business
{
    public enum UserType
    {
        Receptionist,
        GuestLeader
    }

    public class UserManager
    {
        private DALManager m_DataManager;

        //public DALManager DataManager
        //{
        //    get;
        //    set;
        //}

        //public bool LoggedIn
        //{
        //    get;
        //    set;
        //}

        //public UserType UserType
        //{
        //    get;
        //    set;
        //}

        //public string UserName
        //{
        //    get;
        //    set;
        //}

        //public string Password
        //{
        //    get;
        //    set;
        //}

        //public UserManager(bool bLoggedIn, UserType type, string userName, string password)
        //{
        //    LoggedIn = bLoggedIn;
        //    UserType = type;
        //    UserName = userName;
        //    Password = password;
        //}

        public UserManager(DALManager dtManager)
        {
            m_DataManager = dtManager;
        }

        //public void AddUser(UserManager user)
        //{

        //}

        //public void RemoveUser(string sUserName)
        //{

        //}

        public UserManager QueryUser(string sUserName)
        {
            return null;
        }

        public bool Login(string sUserName, string sPassword, out long lTransID)
        {
            return m_DataManager.UserDAL.Login(sUserName, sPassword, out lTransID);
        }

        public void Logout(string sUserName)
        {
            try
            {
                m_DataManager.UserDAL.Logout(sUserName);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
    }
}
